import React, {Component} from 'react';
import { Tabs } from "antd";
import TabContent from "./component/tabContent";

const { TabPane } = Tabs;
class Index extends Component {
  state = {
    defaultActiveKey: "1",
  }
  componentDidMount() {

  }
  onTabChange(e){
    this.setState({
      defaultActiveKey: e
    })
  }
  render() {
    let {
      defaultActiveKey
    } = this.state;
    return (
        <div className="p-layout-box commodity-examine">
          <Tabs activeKey={defaultActiveKey} type="card" size={'small'} onChange={(e) => this.onTabChange(e)}>
            <TabPane tab="猫猫" key={"1"} forceRender>
              <TabContent history={this.props.history} type={1}/>
            </TabPane>
            <TabPane tab="狗狗" key={"2"} forceRender>
              <TabContent history={this.props.history} type={0}/>
            </TabPane>
          </Tabs>
        </div>
    );
  }
}

export default Index;
